//流转标-
function lz_money_subtract_click(lz_id){
	var money_tmp = parseInt($("#lz_"+lz_id).val());
	money_tmp = money_tmp-1;
	if(money_tmp < 1)
		money_tmp = 1;
	$("#lz_account_"+lz_id).val(money_tmp);
	money_tmp = money_tmp+"份"
	$("#lz_"+lz_id).val(money_tmp);
}
//流转标+
function lz_money_add_click(lz_id){
	var money_tmp = parseInt($("#lz_"+lz_id).val());
	money_tmp = money_tmp+1;
	$("#lz_account_"+lz_id).val(money_tmp);
	money_tmp = money_tmp+"份"
	$("#lz_"+lz_id).val(money_tmp);
}

//普通标-
function money_subtract_click(lz_id){
	var money_tmp = parseInt($("#lz_"+lz_id).val());
	money_tmp = money_tmp-100;
	if(money_tmp < 100)
		money_tmp = 100;
	$("#account_"+lz_id).val(money_tmp);
	money_tmp = money_tmp+"元"
	$("#lz_"+lz_id).val(money_tmp);
}
//普通标+
function money_add_click(lz_id){
	var money_tmp = parseInt($("#lz_"+lz_id).val());
	money_tmp = money_tmp+100;
	$("#account_"+lz_id).val(money_tmp);
	money_tmp = money_tmp+"元"
	$("#lz_"+lz_id).val(money_tmp);
}
//普通标，直接输入金额
function money_charge_click(lz_id){
	var money_tmp = $("#lz_"+lz_id).val();
	if(money_tmp.indexOf("元") > 0){
		var temp = money_tmp.replace("份","");
		if(IsDouble(temp) == false){
			$("#account_"+lz_id).val(100);
			$("#lz_"+lz_id).val("100元");
		}else{
			$("#account_"+lz_id).val(money_tmp.replace("元",""));
		}
	}else{
		if(IsDouble($("#lz_"+lz_id).val()) == false){
			$("#account_"+lz_id).val("100");
			$("#lz_"+lz_id).val("100元");
		}else{
			$("#account_"+lz_id).val(money_tmp);
			money_tmp = money_tmp+"元";
			$("#lz_"+lz_id).val(money_tmp);
		}
	}
}
//流转标，直接输入份数
function lz_money_charge_click(lz_id){
	var money_tmp = $("#lz_"+lz_id).val();
	if(money_tmp.indexOf("份") > 0){
		var temp = money_tmp.replace("份","");
		if(IsInteger(temp) == false){
			$("#lz_account_"+lz_id).val(1);
			$("#lz_"+lz_id).val("1份");
		}else{
			$("#lz_account_"+lz_id).val(money_tmp.replace("份",""));
		}
	}else{
		if(IsInteger($("#lz_"+lz_id).val()) == false){
			$("#lz_account_"+lz_id).val("1");
			$("#lz_"+lz_id).val("1份");
		}else{
			$("#lz_account_"+lz_id).val(money_tmp);
			money_tmp = money_tmp+"份";
			$("#lz_"+lz_id).val(money_tmp);	
		}
	}
}
function tab_tager(tab_name, tab_id, tab_id1, class_name){
	$("#"+tab_name+"_"+tab_id).attr('class',class_name);
	$("#"+tab_name+"_content_"+tab_id).show();
	$("#"+tab_name+"_"+tab_id1).attr('class','');
	$("#"+tab_name+"_content_"+tab_id1).hide();
}

function show_news(a,b,c){
	document.getElementById('news'+a).className="gsdlist_news_title_hover";
	document.getElementById('news_list'+a).style.display="";
	
	document.getElementById('news'+b).className="";
	document.getElementById('news_list'+b).style.display="none";
	
	document.getElementById('news'+c).className="";
	document.getElementById('news_list'+c).style.display="none";
}

function paiming(a,b){
	document.getElementById('paiming'+a).style.display="";
	document.getElementById('paiming'+b).style.display="none";
}

function checkCookie(){
	var val = getCookie('headMenu');
	if(val<1){
		var i = 1;
		setCookie(i);
	}else{
		var i = val;
	}
	for(var k=1;k<9;k++){
		if(i==k){
			document.getElementById('menu'+k).className="gsdmenu_hover";
			document.getElementById('child'+k).style.display="";
		}
		else{
			document.getElementById('menu'+k).className="";
			document.getElementById('child'+k).style.display="none";
		}
	}
	
}

function setCookie(value)
{
	var name = 'headMenu';
    var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    if(expires!=null)
    {
        var LargeExpDate = new Date ();
        LargeExpDate.setTime(LargeExpDate.getTime() + (expires*1000*3600*24));         
    }
    document.cookie = name + "=" + escape (value)+((expires == null) ? "" : ("; expires=" +LargeExpDate.toGMTString()))+"; domain=" + "gsdai.com;path=/";
}

function getCookie(Name)
{
    var search = Name + "=" ;
    if(document.cookie.length > 0)
    {
        offset = document.cookie.indexOf(search)
        if(offset != -1)
        {
            offset += search.length
            end = document.cookie.indexOf(";", offset)
            if(end == -1) end = document.cookie.length
            return unescape(document.cookie.substring(offset, end))
        }
        else return "";
    }
} 

function menu_hover(a){
	for(var k=1;k<9;k++){
		if(a==k){
			//document.getElementById('menu'+k).className="gsdmainnav_hover";
			document.getElementById('child'+k).style.display="";
		}
		else{
			//document.getElementById('menu'+k).className="";
			document.getElementById('child'+k).style.display="none";
		}
	}
}

//验证码
function changeImage() {
	document.getElementById("imgCode").src = "/yanzheng/index/?" + Math.random();
}
function changeImage1() {
	document.getElementById("imgCode1").src = "/yanzheng/index/?" + Math.random();
}